#include<bits/stdc++.h>
using namespace std;
int n,a[1000005];
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	scanf("%d",&n);
	for(int i=1;i<=n;i=i+1){
		scanf("%d",&a[i]);
	}
	sort(a+1,a+n+1);
	int l=0,r=1;
	int ans=n;
	while(1){
		++l;
		while(r<=n and a[r]<=a[l]){
			++r;
		}
		if(r>n){
			break;
		}
		else{
			++r;
			--ans;
		}
	}
	printf("%d\n",ans);
	return 0;
}
//                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
